package com.khshop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.khshop.pojo.Cart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.khshop.vo.ServiceResult;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 购物车 服务类
 * </p>
 *
 * @author zhaoyang
 * @since 2020-10-16
 */
public interface CartService extends IService<Cart> {


    //新增购物车
    public ServiceResult<Cart> addCart(Cart Cart);

    //修改购物车
    public ServiceResult<Cart> updateCart(Cart Cart);

    //删除购物车
    public ServiceResult<Cart> delCart(Integer id);

    //查询购物车
    public ServiceResult<IPage<Cart>> searchCart(Map<String,String> map, Integer page, Integer limit);

    //去结算
    public ServiceResult<List<Cart>> toOrders(Integer []id);

    //清空购物车
    public ServiceResult<Cart> clearCart(Integer userid);


    //浏览商品历史记录

    //计算商品总价

}
